programming4us
           
 
 
Windows Server

Managing Windows Server 2012 Storage and File Systems : Storage Management (part 10) - Managing MBR disk partitions on basic disks - Extending partitions, Shrinking partitions

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/2/2013 10:08:55 PM

4.5 Extending partitions

You can extend volumes on both basic and dynamic disks using either Disk Management or DiskPart. This is handy if you create a partition that’s too small and you want to extend it so that you have more space for programs and data. In extending a volume, you convert areas of unallocated space and add them to the existing volume. For spanned volumes on dynamic disks, the space can come from any available dynamic disk, not only those on which the volume was originally created. Thus, you can combine areas of free space on multiple dynamic disks and use those areas to increase the size of an existing volume.

Before you try to extend a volume, be aware of several limitations. First, you can extend simple and spanned volumes only if they are formatted and the file system is NTFS (and in some instances, ReFS). You can’t extend striped volumes. You can’t extend volumes that aren’t formatted or that are formatted with FAT, FAT32, or exFAT. You can extend NTFS (and in some instances, ReFS) volumes on both basic and dynamic disks using either Disk Management or DiskPart.

Using Disk Management, you can extend a simple or spanned volume by following these steps:

  1. Open Disk Management. Press and hold or right-click the volume that you want to extend, and then select Extend Volume. This option is available only if the volume meets the previously discussed criteria and free space is available on one or more of the system’s dynamic disks.

  2. In the Extend Volume Wizard, read the introductory message and then tap or click Next.

  3. On the Select Disks page, shown in Figure 24, select the disk or disks from which you want to allocate free space. Any disks currently being used by the volume are selected automatically. By default, all remaining free space on those disks will be selected for use.

  4. With dynamic disks, you can specify the additional space that you want to use on other disks. Select the disk and then tap or click Add to add the disk to the Selected list box. In the Selected list box, select each disk that you want to use, and in the Select The Amount Of Space In MB list box, specify the amount of unallocated space to use on the selected disk.

  5. Tap or click Next, confirm your options, and then tap or click Finish.

Specify the amount of space to add to the volume.
Figure 24. Specify the amount of space to add to the volume.

By using DiskPart, you can extend partitions using the command line. To extend a partition, invoke DiskPart by typing diskpart at the command prompt. List the disks on the computer by typing list disk. After you check the free space of each disk, select the disk by typing select disk N , where N is the disk you want to work with. Next, list the partitions on the selected disk by typing list partition. Select the last partition in the list by typing select partition N , where N is the disk you want to work with.

Now that you’ve selected a partition, you can extend it. To extend the partition to the end of the disk, type extend. To extend the partition by a set amount, type extend size= N , where N is the amount of space to add in megabytes. For example, if you want to add 90 GBs to the partition, type extend size=90000.

Example 2 shows an actual DiskPart session in which a disk is extended. You can use this as an example to help you understand the process of extending disks. Here, disk 2 has 119 GBs of free space, and its primary partition is extended so that it fills the disk.

Example 2. Extending disks
C:\> diskpart

     Microsoft DiskPart version 6.2.9200
     Copyright (C) 1999-2012 Microsoft Corporation.
     On computer: CORPSVR02

     DISKPART> list disk

       Disk ###  Status   Size    Free   Dyn    Gpt
       --------  --------  -----  -----   ---   ---
       Disk 0    Online   1560 GB 504 GB     *     *
       Disk 1    Online   1290 GB   0 B
       Disk 2    Online   370 GB  119 GB

     DISKPART> select disk 2

     Disk 2 is now the selected disk.

     DISKPART> list partition

       Partition ###   Type      Size     Offset
       -------------   --------- -------  -------
       Partition 1     Primary   370 GB    32 KB

     DISKPART> select partition 1

     Partition 1 is now the selected partition.

     DISKPART> extend

     DiskPart successfully extended the partition.

     DISKPART> exit

     Leaving DiskPart...

     C:\>

To extend a partition on a dynamic disk to free space on another disk, you use the following syntax:

extend size=X disk=Y

Here, size=X sets the amount of space to use in megabytes and disk=Y sets the number of the disk from which to allocate the space. Following this, you could allocate 50 GBs of free space from disk 0 to the selected disk in the previous example (disk 2) using the following command:

extend size=50000 disk=0

4.6 Shrinking partitions

You can shrink volumes on both basic and dynamic disks using either Disk Management or DiskPart. This is handy if you create a partition that’s too large and you want to shrink it so that you have more space for other partitions. In shrinking a volume, you convert areas of allocated but unused space to free space by removing them from an existing volume.

As with extending volumes, several limitations apply to shrinking volumes. First, you can shrink simple and spanned volumes only if they are formatted and the file system is NTFS. You can’t shrink striped volumes. You can’t shrink volumes that are formatted with FAT, FAT32, exFAT, or ReFS. However, you can shrink volumes that have not been formatted. If a volume is heavily fragmented, you might have to defragment the volume to free up additional space before shrinking.

Using Disk Management, you can shrink a simple or spanned volume by following these steps:

  1. Open Disk Management. Press and hold or right-click the volume that you want to shrink, and then select Shrink Volume. This option is available only if the volume meets the previously discussed criteria.

  2. In the field provided in the Shrink dialog box shown in Figure 25, enter the amount of space to shrink. The Shrink dialog box provides the following information:

    • Total Size Before Shrink In MB Lists the total capacity of the volume in megabytes. This is the formatted size of the volume.

    • Size Of Available Shrink Space In MB Lists the maximum amount by which the volume can be shrunk. This doesn’t represent the total amount of free space on the volume; rather, it represents the amount of space that can be removed, not including any data reserved for the master file table, volume snapshots, page files, and temporary files.

    • Enter The Amount Of Space To Shrink In MB Lists the total amount of space that will be removed from the volume. The initial value defaults to the maximum amount of space that can be removed from the volume. For optimal drive performance, you’ll want to ensure that the drive has at least 10 percent of free space after the shrink operation.

    • Total Size After Shrink In MB Lists what the total capacity of the volume in megabytes will be after the shrink. This is the new formatted size of the volume.

    Specify the amount of space to shrink from the volume.
    Figure 25. Specify the amount of space to shrink from the volume.
  3. Tap or click Shrink to shrink the volume.

By using DiskPart, you can shrink partitions using the command line. To shrink an NTFS-formatted partition, invoke DiskPart by typing diskpart at the command prompt. List the disks on the computer by typing list disk. After you check the free space of each disk, select the disk by typing select disk N , where N is the disk you want to work with. Next, list the partitions on the selected disk by typing list partition. Select the last partition in the list by typing select partition N , where N is the disk you want to work with.

Now that you’ve selected a partition, you can shrink it. To determine the maximum amount of space by which you can shrink the disk, type shrink querymax. To shrink the partition by the maximum amount, type shrink. To shrink the partition by a set amount, type shrink desired= N , where N is the amount of space to remove in megabytes. For example, if you want to remove 225 GBs from the partition, type shrink desired=225000.

Example 3 shows an actual DiskPart session in which you shrink a disk. You can use this as an example to help you understand the process of shrinking disks. Here you determine that there are 40 GBs of space available for shrinking on the selected partition and then shrink the partition by 32 GBs.

Example 3. Shrinking disks
C:\> diskpart

   Microsoft DiskPart version 6.2.9200
   Copyright (C) 1999-2012 Microsoft Corporation.
     On computer: CORPSVR02

     DISKPART> list disk

       Disk ###  Status   Size    Free   Dyn    Gpt
       --------  --------  -----  -----   ---   ---
       Disk 0    Online   1560 GB 504 GB    *     *
       Disk 1    Online   1290 GB   0 B
       Disk 2    Online   489 GB    0 B

     DISKPART> select disk 2

     Disk 2 is now the selected disk.

     DISKPART> list partition

       Partition ###   Type      Size     Offset
       -------------   --------- -------  -------
       Partition 1     Primary   489 GB    32 KB

     DISKPART> select partition 1

     Partition 1 is now the selected partition.

     DISKPART> shrink querymax

     The maximum number of reclaimable bytes is: 40 GB

     DISKPART> shrink desired=32000

     DiskPart successfully shrunk the partition by: 32000 MB

     DISKPART> exit

     Leaving DiskPart...

     C:\>

4.7 Deleting a partition, logical drive, or volume

Deleting a partition, logical drive, or volume removes the associated file system and all associated data. When you delete a logical drive, the logical drive is removed from the associated extended partition and its space is marked as free. When you delete a partition or volume, the entire partition or volume is deleted and its space is marked as Unallocated. If you want to delete an extended partition that contains logical drives, however, you must delete the logical drives before trying to delete the extended partition.

In Disk Management, you can delete a partition, logical drive, or volume by pressing and holding or right-clicking it and then choosing Delete Partition, Delete Logical Drive, or Delete Volume, as appropriate. When prompted to confirm the action, tap or click Yes.

Other -----------------
- Windows Server 2008 : Using PowerShell to Manage Active Directory (part 2) - Working with the Domain Object, Creating a List of Domain Computers
- Windows Server 2008 : Using PowerShell to Manage Active Directory (part 1) - Using the Active Directory Module in Windows Server 2008 R2, Creating and Manipulating Objects in Windows Server 2008
- Troubleshooting Windows Home Server 2011 : Understanding Troubleshooting Strategies (part 2)
- Troubleshooting Windows Home Server 2011 : Understanding Troubleshooting Strategies (part 1)
- Troubleshooting Windows Home Server 2011 : Checking for Solutions to Problems
- Troubleshooting Windows Home Server 2011 : Replacing Your System Hard Drive
- Installing Windows Server 2012 and Server Core : Upgrading to Windows Server 2012
- Installing Windows Server 2012 and Server Core : Installing a Clean Version of Windows Server 2012 Operating System (part 2)
- Installing Windows Server 2012 and Server Core : Installing a Clean Version of Windows Server 2012 Operating System (part 1)
- Installing Windows Server 2012 and Server Core : Planning for a Server Installation
- Windows Server 2008 R2 and Windows 7 : Deploying Branchcache (part 3)
- Windows Server 2008 R2 and Windows 7 : Deploying Branchcache (part 2)
- Windows Server 2008 R2 and Windows 7 : Deploying Branchcache (part 1)
- Windows Server 2003 : Managing Daily Operations - Using the AT Command & Using cron
- Windows Server 2003 : Managing Daily Operations - Delegating Control & Using Task Scheduler
- Windows Server 2003 : Auditing Events (part 2) - Setting the Size of Event Logs
- Windows Server 2003 : Auditing Events (part 1) - Audit Settings for Objects
- Windows Server 2003 : Using the Secondary Logon
- Windows Server 2003 : Using the Microsoft Management Console - Creating an MMC-Based Console with Snap-Ins
- Installing Windows Small Business Server 2011 : Selecting Network Components (part 2) - Preparing for the Installation
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us